#include "frm_beats_aca.h"
#include "ui_frm_beats_aca.h"
#include "frm_beats.h"
#include "frm_beats_aca_result.h"
#include <QDesktopWidget>
#include <QDebug>

frm_beats_aca::frm_beats_aca(QDialog *back, QDialog *parent) :
    QDialog(parent),
    ui(new Ui::frm_beats_aca)
{
    ui->setupUi(this);
    back_=back;
    setWindowFlags( Qt:: WindowTitleHint | Qt:: CustomizeWindowHint | Qt:: WindowMinimizeButtonHint | Qt:: WindowMaximizeButtonHint);
    this->move(QApplication::desktop()->screen()->rect().center() - this->rect().center());
}

frm_beats_aca::~frm_beats_aca()
{
    delete ui;
}

void frm_beats_aca::on_b_back_clicked()
{
    frm_beats *beats = new frm_beats(back_);
    this->hide();
    beats->show();
}

void frm_beats_aca::on_b_calculate_clicked()
{
    frm_beats_aca_result *result = new frm_beats_aca_result(back_, ui->e_beats->text().toInt());
    this->hide();
    result->show();
}
